home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
386
/
utility
/
config.s
< prev
next >
Wrap
Text File
|
1985-11-19
|
3KB
|
76 lines
; Program Name: CONFIG.S
; Assembly Instructions:
; Assemble in PC-relative mode and save with a PRG extension. Move
; CONFIG.PRG to the AUTO folder of the boot disk.
; Program Purpose:
; Configures system variables.
mainline:
lea stack, a7 ; Point A7 to this program's stack.
enter_supervisor_mode:
move.l #0, -(sp) ; The zero turns on supervisor mode.
move.w #$20, -(sp) ; Function = super = GEMDOS $20.
trap #1 ; Supervisor stack pointer returned in D0.
addq.l #6, sp
; Algorithm 1:
; Turns off keyclick sound. Refer to page 254 of the Internals book. The
; system variable at address $484 is a byte length variable. The bits of
; this variable have the meanings as indicated in the Internals book. The
; bit of interest is #0. When this bit is a one, the computer emits a
; click each time a key is pressed. When the bit is a zero, these clicks
; are not emitted. A zero is placed in this bit by replacing the content
; of the byte at $484 (which is 7 before the replacement, if key click is
; enabled) with $6.
disable_key_click:
move.b #6, $484 ; Refer to page 254 of the Internals book.
; Algorithm 2:
; Performs the printer installation that is accomplished by CONTROL.ACC.
; The printer configuration table consists of one word, stored at $E4A.
; The bits of this word have the following meanings:
; BIT MEANING IF ZERO MEANING IF ONE
; --- --------------- --------------
; 0 Dot matrix Daisy printer
; 1 Black/white Color printer
; 2 1280 dots/line 960 dots/line
; 3 Draft mode Final mode
; 4 Printer port Modem port
; 5 Continuous feed Single sheet
; Bits 6 through 15 are not used.
install_printer:
move.w #$4, $E4A
; Algorithm 3:
; Turns off disk write verify.
disable_write_verify:
move.w #0, $444 ; Refer to page 252 of the Internals book.
return_to_user_mode:
move.l d0, -(sp) ; Restore "before call" SSP.
move.w #$20, -(sp) ; Function = super = GEMDOS $20.
trap #1
addq.l #6, sp
terminate:
move.w #0, -(sp) ; Function = p_term_old = GEMDOS $0.
trap #1 ; GEMDOS call.
ds.l 24 ; Stack.
stack: ds.l 1 ; Address of stack.
program_end: ds.l 0
end